package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 32338
 * @date 2024-04-21 11:39:41
 * @description
 */
@Mapper
public interface OrderDetailMapper {

    /**
     * @description
     ***:批量插入订单明细数据
     **/
    void insertList(List<OrderDetail> orderDetailList);

    /**
     * @description
     ***:根据订单id来查询订单明细数据
     **/
    @Select("select * from order_detail where order_id = #{orderId}")
    List<OrderDetail> getByOrderId(Long orderId);
}
